﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SGGWElevator
{
    /// <summary>
    /// Describes elevator's cabin status.
    /// Author: Paweł Iżycki
    /// </summary>
    public class Cabin : UniqueObject
    {        
        string name;
        float loadLimit = 0;
        Floor floor = Floor.Undifined;

        //public Floor ActualFloor
        //{
        //    get { return this.floor; }
        //    set { this.floor = value; }
        //}


        #region Constructors

        // #1
        public Cabin(int uniqueId, float loadLimit) : base(uniqueId)
        {            
            this.loadLimit = loadLimit;
        }

        // #2
        public Cabin(int uniqueId, float loadLimit, Floor floor)
            : this(uniqueId, loadLimit)
        {
            if (floor == Floor.Undifined)
                throw new UndifinedFloorException();
            else
                this.floor = floor;
        }

        // #3
        public Cabin(int uniqueId, float loadLimit, Floor floor, string name)
            : this(uniqueId, loadLimit, floor)
        {
            this.name = name;
        }

        #endregion

        public class DefaultElevatorProperties
        {
            public static readonly float DefaultLoadLimit = 450f;
        }
    }
}
